﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:BillsManager.Views.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Values.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type Controls:GridSplitterEx}">

        <Setter Property="Focusable" Value="False" />

        <Setter Property="Background" Value="Transparent" />

        <Setter Property="Foreground" Value="{StaticResource View.Foreground.Disabled}" />

        <Setter Property="HorizontalAlignment" Value="Stretch" />

        <Setter Property="Padding" Value="0 1" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Controls:GridSplitterEx}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}">
                        <Grid>
                            <Rectangle x:Name="line"
                                       Width="{StaticResource Separator.Size}"
                                       HorizontalAlignment="Center"
                                       VerticalAlignment="Stretch"
                                       Fill="{TemplateBinding Foreground}"
                                       UseLayoutRounding="False"
                                       Visibility="Collapsed" />
                            <!--
                                <Popup x:Name="popup"
                                AllowsTransparency="True"
                                Focusable="False"
                                IsOpen="False"
                                Placement="Center"
                                StaysOpen="False">
                                <StackPanel HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Focusable="False"
                                Orientation="Horizontal">
                                <Button Width="30"
                                Command="{x:Static Controls:GridSplitterEx.ShowOnlyNext}"
                                Content="&lt;"
                                Focusable="False" />
                                <Button Width="30"
                                Command="{x:Static Controls:GridSplitterEx.ShowBothEqually}"
                                Content="|"
                                Focusable="False" />
                                <Button Width="30"
                                Command="{x:Static Controls:GridSplitterEx.ShowOnlyPrevious}"
                                Content="&gt;"
                                Focusable="False" />
                                </StackPanel>
                                
                                <Popup.Triggers>
                                
                                <Trigger Property="IsMouseOver" Value="false">
                                <Setter Property="IsOpen" Value="false" />
                                </Trigger>
                                
                                </Popup.Triggers>
                                
                                </Popup>
                            -->
                        </Grid>
                    </Border>

                    <ControlTemplate.Triggers>

                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="line" Property="Visibility" Value="Visible" />
                            <!--  <Setter TargetName="popup" Property="IsOpen" Value="true" />  -->
                        </Trigger>

                    </ControlTemplate.Triggers>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>